{% extends "base.html" %}
{% block content %}
<H1 style="text-align:center">{{title}}</H1>

<HR>
<div style="margin: 0 auto;width:800px;margin-top: 40px;">
    摘要：
    {{summary | safe}}
</div>

<div style="margin: 0 auto;width:800px;margin-top: 40px;background-color: white">
    {{body | safe}}
</div>

<div style="margin: 0 auto;width:800px;margin-top: 40px;background-color: white">
    <font color="black" size="6""> 文章评论</font>
    <hr>
    {% for msg in message %}
    <div>
        <div style="border-bottom:1px solid #dafbe6;">
            {{msg.msg_from}}
        </div>
        <div>
            {{msg.message | safe}}
        </div>
        <div style="border-bottom:1px dashed #e7fbe7;">
            {{msg.timestamp}}
        </div>
    </div>
    {% endfor %}
</div>
<form action="{{ url_for("blog",id=id) }}" method="post" name="addmsg">
{{ form.csrf_token }}
<div style="margin: 0 auto;width:800px;margin-top: 20px;>
    <p>
         昵称:
         <br>{{ form.username(size=80) }}<br>
    </p>
    <p>
        评论内容:
        <br>{{ form.message(id="editor",class="ckeditor") }}<br>
    </p>
    <p><input type="submit" value="发表评论"></p>
</form>
    <script src="/static/ckeditor/ckeditor.js"></script>
    <script>
        CKEDITOR.replace('editor');
    </script>
</div>

{% endblock %}